import { Button } from "antd";
import { useContext } from "react";
import context from "../../ThemeContext";
import action from "../../store/actions";
const VoteFooter = function VoteFooter() {
  const { store } = useContext(context);
  return (
    <div>
      <Button
        type="primary"
        style={{ marginRight: "20px" }}
        onClick={() => {
          store.dispatch(action.vote.support());
        }}
      >
        支持
      </Button>
      <Button
        type="primary"
        danger
        onClick={() => {
          // store.dispatch({
          //   type: TYEPS.VOTE_OPP,
          // });
          store.dispatch(action.vote.oppose());
        }}
      >
        反对
      </Button>
    </div>
  );
};

export default VoteFooter;
